package com.linkoog.devtools.websocket.toolwindow.left;

import com.intellij.icons.AllIcons;
import com.intellij.ide.util.ElementsChooser;
import com.intellij.ide.util.MultiStateElementsChooser;

import javax.swing.*;
import java.awt.*;
import java.util.List;

public class FilterPopupUtil {

    public static final String INBOUND = "Inbound";
    public static final String OUTBOUND = "Outbound";


    public static ElementsChooser<String> createElementsChooser(){
        ElementsChooser<String> chooser = new ElementsChooser<>(true);
        chooser.addElement(INBOUND, true, new MultiStateElementsChooser.ElementProperties() {
            @Override
            public Icon getIcon() {
                return AllIcons.Ide.IncomingChangesOn;
            }
        });
        chooser.addElement(OUTBOUND, true, new MultiStateElementsChooser.ElementProperties() {
            @Override
            public Icon getIcon() {
                return AllIcons.Ide.OutgoingChangesOn;
            }
        });

        chooser.setPreferredSize(new Dimension(150, chooser.getElementCount() * 26));
        return chooser;
    }

}
